<?php
class SubcontractorPage extends UserDefinedForm {
	public static $db = array(
        'StaffTitle'    => 'Varchar(255)',
        'StaffText'     => 'Text',
        'ExtraTitle'    => 'Varchar(255)',
        'ExtraText'     => 'Text',        
	);
	
	public static $has_one = array(
        'StaffImage'    => 'Image',
        'ExtraImage'    => 'Image',
	);

    static $hide_ancestor = 'UserDefinedForm';
    
	function getCMSFields(){
		$fields = parent::getCMSFields();
		
        $fields->addFieldToTab('Root.Content.Main', new TextField('StaffTitle', 'Staff title'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextareaField('StaffText', 'Text'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new ImageField('StaffImage', 'Image (Recommended size: 236 x 112)'), 'Content');
        
		$fields->addFieldToTab('Root.Content.Main', new TextField('ExtraTitle', 'Extra title'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new TextareaField('ExtraText', 'Extra text'), 'Content');
        $fields->addFieldToTab('Root.Content.Main', new ImageField('ExtraImage', 'Extra image (Recommended size: 236 x 112)'), 'Content');
        
		return $fields;
	}
}

class SubcontractorPage_Controller extends UserDefinedForm_Controller {	
	public function init() {        
		parent::init();		
	}
}